/**
 * Created by WangMing on 15/12/9.
 */
define([
  "../../service",
  "../../widgets/notice_table_widget/notice_table_widget"
  ], function(api) {
    // 定义所有相关的vmodel
    var vm = avalon.define({
        $id: "notices",
        $breadcrumb: {
            stateName: "notices", 
            guid: "",
            title: "" // translation later in routers
        },

        results: {
            noCategory: true,
            params: {
              method:api.getNotices,
              PageSize:15
            }
        },
        displayPage:function(state){
            return state.vmName == "notices";
          }
    });

    return avalon.controller(function($ctrl) {
        // 视图渲染后，意思是avalon.scan完成
        $ctrl.$onRendered = function() {

        };
        // 进入视图
        $ctrl.$onEnter = function(param, rs, rj) {
        
        };
        // 对应的视图销毁前
        $ctrl.$onBeforeUnload = function() {

        };
        $ctrl.$vmodels = [vm];
    })
});
